import request from '@/utils/request'

// 查询列表
export function getBusinessBudgetList(params) {
  return request({
    url: '/ysBusinessBudget/getBusinessBudgetList',
    method: 'POST',
    data: params
  })
}
// xiu ding ji lu
export function getModifyRecordList(params) {
  return request({
    url: '/ysBusinessBudget/getModifyRecordList',
    method: 'POST',
    data: params
  })
}

// 新增业务凭证
export function insertBusinessBudget(params) {
  return request({
    url: '/ysBusinessBudget/insertBusinessBudget',
    method: 'POST',
    data: params
  })
}

// 更新业务凭证
export function updateBusinessAccountByNum(params) {
  return request({
    url: '/ysBusinessBudget/updateBusinessAccountByNum',
    method: 'POST',
    data: params
  })
}

// 删除业务凭证
export function deleteByNum(params) {
  return request({
    url: `/ysBusinessBudget/deleteByNum/${params.id}`,
    method: 'GET'
  })
}

// 撤销
export function revokeRecord(params) {
  return request({
    url: '/ysBusinessBudget/revokeRecord',
    method: 'POST',
    data: params
  })
}

// 发布
export function releaseData(params) {
  return request({
    url: '/ysBusinessBudget/releaseData',
    method: 'POST',
    data: params
  })
}

// 导出
export function exportExcelYsBusinessBudget(params) {
  return request({
    url: '/ysBusinessBudget/exportExcelYsBusinessBudget',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 获取资产类列表
export function getAssetInfoList(params) {
  return request({
    url: '/ysBusinessAsset/getAssetInfoList',
    method: 'POST',
    data: params
  })
}

// 新增资产类
export function insertBusinessAsset(params) {
  return request({
    url: '/ysBusinessAsset/insertBusinessAsset',
    method: 'POST',
    data: params
  })
}

// 更新资产类
export function updateBusinessAssetByNum(params) {
  return request({
    url: '/ysBusinessAsset/updateBusinessAssetByNum',
    method: 'POST',
    data: params
  })
}

// 费用类发布
export function AssetReleaseData(params) {
  return request({
    url: '/ysBusinessAsset/releaseData',
    method: 'POST',
    data: params
  })
}

// 费用类导出
export function exportExcelYsBusinessAsset(params) {
  return request({
    url: '/ysBusinessAsset/exportExcelYsBusinessAsset',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 删除资产类
export function deleteByNumOther(params) {
  return request({
    url: `/ysBusinessAsset/deleteByNum/${params.id}`,
    method: 'GET'
  })
}

// 资产类导出
export function exportExcelYsManageAsset(params) {
  return request({
    url: '/ysBusinessAsset/exportExcelYsBusinessAsset',
    method: 'POST',
    data: params,
    responseType: 'blob'
  })
}

// 资产类查询修订记录
export function meGetModifyRecordList(params) {
  return request({
    url: '/ysBusinessAsset/getModifyRecordList',
    method: 'POST',
    data: params
  })
}

// 资产类撤销
export function meRevokeRecord(params) {
  return request({
    url: '/ysBusinessAsset/revokeRecord',
    method: 'POST',
    data: params
  })
}
